<?php
class Application_Form_Users extends Zend_Form
{
    public function init()
    {
        $this->setName('user_form');
        parent::init();

        $this->setMethod('POST');

        $adi = new Zend_Form_Element_Text('first_name');
        $adi->setLabel('Adi')
            ->setAttribs(array(
                'placeholder' => 'Adi',
                'id' => 'username'
            ))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->addValidator('Alnum');
        $this->addElement($adi);

        $soyadi = new Zend_Form_Element_Text('last_name');
        $soyadi->setLabel('Soyadi')
            ->setAttribs(array(
                'placeholder' => 'Soyadi',
                'id' => 'lastname'
            ))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->addValidator('Alnum');
        $this->addElement($soyadi);

        $city = new Zend_Form_Element_Select('city');
        $city->setLabel('City')
            ->setAttribs(array(
                'placeholder' => 'Sehir',
                'id' => 'sehir'
            ))
            ->setMultiOptions(array(
                0 => "Bishkek",
                1 => "Jok Bashka"
            ))
            ->setRequired(true)
            ->addValidator('NotEmpty');
        $this->addElement($city);

        $address = new Zend_Form_Element_Text('address');
        $address->setLabel('Adresi')
            ->setAttribs(array(
                'placeholder' => 'adresi',
                'id' => 'adres'
            ))
            ->setRequired(true)
            ->addValidator('NotEmpty')
            ->addValidator('Alnum');
        $this->addElement($address);



        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Submit');
        $this->addElement($submit);
    }
}
